\(\int \frac {(a+\frac {b}{x})^3}{x^2} \, dx\) [1578]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 16 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {\left (a+\frac {b}{x}\right )^4}{4 b} \]

[Out]

-1/4*(a+b/x)^4/b

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {267} \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {\left (a+\frac {b}{x}\right )^4}{4 b} \]

[In]

Int[(a + b/x)^3/x^2,x]

[Out]

-1/4*(a + b/x)^4/b

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (a+\frac {b}{x}\right )^4}{4 b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(39\) vs. \(2(16)=32\).

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 2.44 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {b^3}{4 x^4}-\frac {a b^2}{x^3}-\frac {3 a^2 b}{2 x^2}-\frac {a^3}{x} \]

[In]

Integrate[(a + b/x)^3/x^2,x]

[Out]

-1/4*b^3/x^4 - (a*b^2)/x^3 - (3*a^2*b)/(2*x^2) - a^3/x

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(33\) vs. \(2(14)=28\).

Time = 0.02 (sec) , antiderivative size = 34, normalized size of antiderivative = 2.12

method result size
gosper \(-\frac {4 a^{3} x^{3}+6 a^{2} b \,x^{2}+4 a \,b^{2} x +b^{3}}{4 x^{4}}\) \(34\)
norman \(\frac {-a^{3} x^{3}-\frac {3}{2} a^{2} b \,x^{2}-a \,b^{2} x -\frac {1}{4} b^{3}}{x^{4}}\) \(35\)
risch \(\frac {-a^{3} x^{3}-\frac {3}{2} a^{2} b \,x^{2}-a \,b^{2} x -\frac {1}{4} b^{3}}{x^{4}}\) \(35\)
default \(-\frac {a \,b^{2}}{x^{3}}-\frac {a^{3}}{x}-\frac {3 a^{2} b}{2 x^{2}}-\frac {b^{3}}{4 x^{4}}\) \(36\)
parallelrisch \(\frac {-4 a^{3} x^{3}-6 a^{2} b \,x^{2}-4 a \,b^{2} x -b^{3}}{4 x^{4}}\) \(36\)

[In]

int((a+b/x)^3/x^2,x,method=_RETURNVERBOSE)

[Out]

-1/4*(4*a^3*x^3+6*a^2*b*x^2+4*a*b^2*x+b^3)/x^4

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (14) = 28\).

Time = 0.25 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.06 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {4 \, a^{3} x^{3} + 6 \, a^{2} b x^{2} + 4 \, a b^{2} x + b^{3}}{4 \, x^{4}} \]

[In]

integrate((a+b/x)^3/x^2,x, algorithm="fricas")

[Out]

-1/4*(4*a^3*x^3 + 6*a^2*b*x^2 + 4*a*b^2*x + b^3)/x^4

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (10) = 20\).

Time = 0.11 (sec) , antiderivative size = 36, normalized size of antiderivative = 2.25 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=\frac {- 4 a^{3} x^{3} - 6 a^{2} b x^{2} - 4 a b^{2} x - b^{3}}{4 x^{4}} \]

[In]

integrate((a+b/x)**3/x**2,x)

[Out]

(-4*a**3*x**3 - 6*a**2*b*x**2 - 4*a*b**2*x - b**3)/(4*x**4)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {{\left (a + \frac {b}{x}\right )}^{4}}{4 \, b} \]

[In]

integrate((a+b/x)^3/x^2,x, algorithm="maxima")

[Out]

-1/4*(a + b/x)^4/b

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.88 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {{\left (a + \frac {b}{x}\right )}^{4}}{4 \, b} \]

[In]

integrate((a+b/x)^3/x^2,x, algorithm="giac")

[Out]

-1/4*(a + b/x)^4/b

Mupad [B] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.06 \[ \int \frac {\left (a+\frac {b}{x}\right )^3}{x^2} \, dx=-\frac {a^3\,x^3+\frac {3\,a^2\,b\,x^2}{2}+a\,b^2\,x+\frac {b^3}{4}}{x^4} \]

[In]

int((a + b/x)^3/x^2,x)

[Out]

-(b^3/4 + a^3*x^3 + (3*a^2*b*x^2)/2 + a*b^2*x)/x^4